<%= header %>
<%= boomerangScript %>
<script src="../../vendor/jquery/dist/jquery.min.js"></script>
<script src="../../vendor/ember/ember.debug.js"></script>
<script src="../../vendor/handlebars/handlebars.min.js"></script>
<script src="../../vendor/ember/ember-template-compiler.js"></script>
<script src="support/app.js"></script>

<script type="text/x-handlebars">
	<div class="container">
		{{outlet}}
	</div>
</script>

<script>
window.imgs = [];
</script>

<script src="/test-templates/spa/13-autoxhr-disabled.js" type="text/javascript"></script>
<script src="13-autoxhr-disabled.js" type="text/javascript"></script>

<script>
/*eslint-disable no-unused-vars*/
BOOMR_test.init({
	testAfterOnBeacon: true,
	afterFirstBeacon: function() {
		if (!BOOMR.plugins.AutoXHR) {
			return;
		}
		//
		// Send a XHRs, and insert an image after it comes back
		//
		setTimeout(function(){
			var xhr = new XMLHttpRequest();
			xhr.open("GET", "/delay?delay=2000&file=/pages/08-ember/support/widget.json&id=1&rnd=" + Math.random(), true);
			xhr.onreadystatechange = function() {
				// fire another XHR
				if (xhr.readyState === 4) {
					var img = document.createElement("img");
					img.src = "/delay?delay=2000&file=/pages/08-ember/support/img.jpg&rnd=" + Math.random();
					document.body.appendChild(img);
				}
			};
			xhr.send(null);
		}, 0);
	},
	History: {
		enabled: true,
		monitorHistory: false
	},
	instrument_xhr: false,
	autorun: false
});
</script>
<%= footer %>
